import request from '@/config/axios'

// 地区配送说明 VO
export interface GlobeStateInstructionsVO {
  id: number // 地区配送说明id
  stateId: number // 国家id
  stateName: string // 国家名称
  language: string // 语言
  stateInstructions: string // 配送说明
  creatorName: string // 创建者姓名
  date: string // 时区
}

// 地区配送说明 API
export const GlobeStateInstructionsApi = {
  // 查询地区配送说明分页
  getGlobeStateInstructionsPage: async (params: any) => {
    return await request.get({ url: `/trade/globe-state-instructions/page`, params })
  },

  // 查询地区配送说明详情
  getGlobeStateInstructions: async (id: number) => {
    return await request.get({ url: `/trade/globe-state-instructions/get?id=` + id })
  },

  // 新增地区配送说明
  createGlobeStateInstructions: async (data: GlobeStateInstructionsVO) => {
    return await request.post({ url: `/trade/globe-state-instructions/create`, data })
  },

  // 修改地区配送说明
  updateGlobeStateInstructions: async (data: GlobeStateInstructionsVO) => {
    return await request.put({ url: `/trade/globe-state-instructions/update`, data })
  },

  // 删除地区配送说明
  deleteGlobeStateInstructions: async (id: number) => {
    return await request.delete({ url: `/trade/globe-state-instructions/delete?id=` + id })
  },

  // 导出地区配送说明 Excel
  exportGlobeStateInstructions: async (params) => {
    return await request.download({ url: `/trade/globe-state-instructions/export-excel`, params })
  },
}